
class GameUIController extends BaseController {
    private gameUIView: GameUIView;

    public constructor() {
        super();

        this.gameUIView = new GameUIView(this, LayerManager.UI_Game);
        App.ViewManager.register(ViewConsts.GameUI, this.gameUIView);

        this.registerFunc(GameUIConsts.SetPkProgress, this.setPkProgress, this);
        this.registerFunc(GameUIConsts.SetGameInfo, this.setGameInfo, this);
        this.registerFunc(GameUIConsts.SetGame, this.setGame, this);
    }

    public setPkProgress(red: number, blue: number): void {
        this.gameUIView.PkProgress.SetProgress(red, blue);
    }
    public setGameInfo(name: string): void {
        this.gameUIView.GameName.text = name;
    }
    public setGame(game: AllGameConsts):void{
        this.gameUIView.SetGame(game);
    }
}